﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ElectionResults.aspx.cs"
    Inherits="OVS.ElectionResults" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <link href="~/OVS.css" rel="stylesheet" type="text/css" />
    <link href="~/themes/ui-lightness/jquery.ui.all.css" rel="stylesheet" type="text/css" />
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
     <center>
     <div id="divCannotShow" runat="server" >
        <asp:Label ID="lblCannotShow" CssClass="valuefield" runat="server"></asp:Label>
     </div>
          <div>
                    <asp:Label ID="Label1" runat="server" CssClass="ParaTitle">Election Results</asp:Label>
                    </div>
                    
    <div id="divElectionResults" runat ="server">
        <table cellpadding="2" cellspacing="2">
            <tr>
                <td colspan="2">
                    <OVSControl:SelectWard ID="SelectWard" runat="server" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Button ID="btnSearch" runat="server" Text="Get Results" OnClick="btnSearch_Click" />
                </td>
            </tr>
        </table>
        
        <div id="divResults" runat="server" visible="false">
        <table>
            <tr>
                <td>
                    Winner
                </td>
            </tr>
            <tr>
                <td>
                    <table border =1>
                        <tr>
                            <td>
                                <asp:image id="imgWinner" runat="server" width="100px" height="100px" />
                            </td>
                              <td>
                                <asp:image id="imgParty" runat="server" width="100px" height="100px" />
                            </td>
                            <td>
                                 <table >
                                    <tr>
                                        <td>
                                             <asp:label ID="Label2" runat="server" Text="Name" />   :
                                            <asp:label ID="candidateName" runat="server"  />                                            
                                        </td>
                                    </tr>
                                     <tr>
                                        <td>
                                             <asp:label ID="Label3" runat="server" Text="Party" />   :
                                            <asp:label ID="candidateParty" runat="server"  />                                            
                                        </td>
                                    </tr>
                                     <tr>
                                        <td>
                                             <asp:label ID="Label4" runat="server" Text="Votes" />   :
                                            <asp:label ID="candidateVotes" runat="server"  />                                            
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                
                </td>
            </tr>
        </table>
         <table width="90%">
            <tr>
                <td colspan="2">
                    <asp:GridView ID="gvCandidateList" Width="94%" runat="server" AutoGenerateColumns="false"
                    BorderColor="Black" DataKeyNames="CandidateId" >
                    <HeaderStyle BackColor="White" Font-Size="10px" ForeColor="#990000" BorderStyle="None" />
                    <RowStyle BackColor="#F7F3F7" Font-Names="Verdana" Font-Size="XX-Small" BorderStyle="None" />
                    <AlternatingRowStyle BackColor="White" Font-Names="Verdana" Font-Size="XX-Small"
                        BorderStyle="None" />
                  
                    <Columns>
                   
                    <asp:TemplateField HeaderStyle-Width="20%" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center"
                            ItemStyle-BorderStyle="None" HeaderStyle-BorderStyle="None">
                            <HeaderTemplate>
                                <asp:Label runat="server" ID="CandidateID" Text="Candidate ID"></asp:Label><br />                                
                            </HeaderTemplate>
                            <ItemTemplate>
                              <asp:Label ID="lblCandidateId" Text='<%# DataBinder.Eval(Container.DataItem, "CandidateId") %>'
                               Width="100px" Height="100px" runat="server" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        
                        <asp:TemplateField HeaderStyle-Width="20%" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center"
                            ItemStyle-BorderStyle="None" HeaderStyle-BorderStyle="None">
                            <HeaderTemplate>
                                <asp:Label runat="server" ID="CandidatePhoto" Text="Candidate Photo"></asp:Label><br />                                
                            </HeaderTemplate>
                            <ItemTemplate>
                              <asp:Image ID="imgPhoto" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "Voter.Photo") %>' Width="100px" Height="100px" runat="server" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        
                          <asp:TemplateField HeaderStyle-Width="20%" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center"
                            ItemStyle-BorderStyle="None" HeaderStyle-BorderStyle="None">
                            <HeaderTemplate>
                                <asp:Label runat="server" ID="Symbol"   Text="Symbol"></asp:Label><br />                                
                            </HeaderTemplate>
                            <ItemTemplate>
                              <asp:Image ID="imgSymbol" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "Symbol") %>' Width="100px" Height="100px" runat="server" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        
                          <asp:TemplateField HeaderStyle-Width="20%" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center"
                            ItemStyle-BorderStyle="None" HeaderStyle-BorderStyle="None">
                            <HeaderTemplate>
                                <asp:Label runat="server" ID="Details" Text="Details"></asp:Label><br />                                
                            </HeaderTemplate>
                            <ItemTemplate>
                                <table >
                                    <tr>
                                        <td>
                                             <asp:label ID="Label2" runat="server" Text="Name" />   :
                                            <asp:label ID="candidateName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Voter.Name") %>' />                                            
                                        </td>
                                    </tr>
                                     <tr>
                                        <td>
                                             <asp:label ID="Label3" runat="server" Text="Party" />   :
                                            <asp:label ID="Label1" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Party") %>' />                                            
                                        </td>
                                    </tr>
                                     <tr>
                                        <td>
                                             <asp:label ID="Label4" runat="server" Text="Votes" />   :
                                            <asp:label ID="Label5" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Votes") %>' />                                            
                                        </td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                        </asp:TemplateField>
                        
                       
                       
                    </Columns>
                </asp:GridView>
                </td>
            </tr>
            <tr >
                <td colspan="2">
                  
                    
                </td>
            </tr>
            </table>
            </div>
    </div>
     </center>
    </form>
</body>
</html>
